<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>TEST FOR READING JSON</title>
    <link rel="stylesheet" type="text/css" href="ext-4.2.1.883/resources/css/ext-all.css"/>
    <script type="text/javascript" src="ext-4.2.1.883/ext-all-debug.js"></script>
    <script type="text/javascript" src="ext-4.2.1.883/locale/ext-lang-zh_CN.js"></script>
    <script type="text/javascript" src="data/user.json"></script>
    <script type="text/javascript" src="lib/jquery-3.2.1.js"></script>
</head>

<body>

    alert("First step");
    <script type=text/javascript>
        var xhr = null;
        if(window.XMLHttpRequest){
            xhr = new XMLHttpRequest();
        }else {
            xhr = new ActiveXObject("Microsoft.XMLHttp");
        }
		

        var url = "user.json";


        xhr.open("POST",url,true);
					alert("12");

        xhr.onreadystatechange = function () {
            if (xhr.readyState==4){
                if (xhr.status==200){
                    var text = xhr.responseText;
                    var users = eval('(' + text + ')');
                    alert("can you come to here?");
//                    document.getElementById("name").innerHTML = users.name;
//                    document.getElementById("age").innerHTML = users.age;
                }
            }
        }
    </script>

<p id="name">hello</p>
<p id="age">hello</p>
</body>
</html>